<?php
/**
 * Created by PhpStorm.
 * User: apple
 * Date: 2020/10/12
 * Time: 4:06 PM
 */
namespace app\index\logic;

use app\model\Goods;
use app\model\GoodsExchange;
use app\model\IntegralLog;
use app\model\User;
use think\facade\Db;
use think\facade\Request;

class GoodsLogic
{

    public function getList(){
        $orgid = config('user')['orgid'];

        $where = [
            'goods_orgid' => $orgid,
            'goods_status' => 1,
        ];
        $goodsModel = new Goods();

        return $goodsModel->getGoodsListByCondition($where);
    }


    public function getIntegralList()
    {
        $where = [
            'integral_uid' => config('user')['id'],
        ];
        $integralLogModel = new IntegralLog();

        return $integralLogModel->getIntegralLogListByCondition($where);
    }

}